package com.yy.ssjx.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 描述:
 * 开启事务
 * @EnableTransactionManagement
 *
 * @author: yanglin
 * @Date: 2021-11-12-10:23
 * @Version: 1.0
 */
@MapperScan("com.yy.ssjx.mapper")
@EnableTransactionManagement
@Configuration
public class MybatisPlusConfig {

    /**
     * 分页插件
     * @return 分页插件对象
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
